#coding:utf-8

import cv2
import numpy as np

img = cv2.imread("final.bmp")
out = np.zeros(img.shape,np.uint8)
w,h = img.shape[:2]
for i in range(w):
    for j in range(h):
        if img[i,j,2] %2 != 0:
            out[i,j,0]=255
            out[i,j,1]=255
            out[i,j,2]=255
cv2.imwrite("out.bmp",out)
